#[doc = "Register `RF_TEMP_STS` reader"]
pub struct R(crate::R<RF_TEMP_STS_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<RF_TEMP_STS_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<RF_TEMP_STS_SPEC>> for R {
    fn from(reader: crate::R<RF_TEMP_STS_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "TSensor overtemperature protection control.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TSENSOR_OVERTEMP_PRT_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: normal working mode."]
    WORKING = 1,
}
impl From<TSENSOR_OVERTEMP_PRT_A> for bool {
    #[inline(always)]
    fn from(variant: TSENSOR_OVERTEMP_PRT_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `tsensor_overtemp_prt` reader - TSensor overtemperature protection control."]
pub struct TSENSOR_OVERTEMP_PRT_R(crate::FieldReader<bool, TSENSOR_OVERTEMP_PRT_A>);
impl TSENSOR_OVERTEMP_PRT_R {
    pub(crate) fn new(bits: bool) -> Self {
        TSENSOR_OVERTEMP_PRT_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TSENSOR_OVERTEMP_PRT_A {
        match self.bits {
            false => TSENSOR_OVERTEMP_PRT_A::DISABLED,
            true => TSENSOR_OVERTEMP_PRT_A::WORKING,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == TSENSOR_OVERTEMP_PRT_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `WORKING`"]
    #[inline(always)]
    pub fn is_working(&self) -> bool {
        **self == TSENSOR_OVERTEMP_PRT_A::WORKING
    }
}
impl core::ops::Deref for TSENSOR_OVERTEMP_PRT_R {
    type Target = crate::FieldReader<bool, TSENSOR_OVERTEMP_PRT_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Overtemperature protection control signal.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RF_OVER_TEMP_PRT_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: normal working mode."]
    WORKING = 1,
}
impl From<RF_OVER_TEMP_PRT_A> for bool {
    #[inline(always)]
    fn from(variant: RF_OVER_TEMP_PRT_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rf_over_temp_prt` reader - Overtemperature protection control signal."]
pub struct RF_OVER_TEMP_PRT_R(crate::FieldReader<bool, RF_OVER_TEMP_PRT_A>);
impl RF_OVER_TEMP_PRT_R {
    pub(crate) fn new(bits: bool) -> Self {
        RF_OVER_TEMP_PRT_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RF_OVER_TEMP_PRT_A {
        match self.bits {
            false => RF_OVER_TEMP_PRT_A::DISABLED,
            true => RF_OVER_TEMP_PRT_A::WORKING,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == RF_OVER_TEMP_PRT_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `WORKING`"]
    #[inline(always)]
    pub fn is_working(&self) -> bool {
        **self == RF_OVER_TEMP_PRT_A::WORKING
    }
}
impl core::ops::Deref for RF_OVER_TEMP_PRT_R {
    type Target = crate::FieldReader<bool, RF_OVER_TEMP_PRT_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bit 3 - TSensor overtemperature protection control."]
    #[inline(always)]
    pub fn tsensor_overtemp_prt(&self) -> TSENSOR_OVERTEMP_PRT_R {
        TSENSOR_OVERTEMP_PRT_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 1 - Overtemperature protection control signal."]
    #[inline(always)]
    pub fn rf_over_temp_prt(&self) -> RF_OVER_TEMP_PRT_R {
        RF_OVER_TEMP_PRT_R::new(((self.bits >> 1) & 0x01) != 0)
    }
}
#[doc = "RF_TEMP_STS is the RF TEMP overtemperature status register.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rf_temp_sts](index.html) module"]
pub struct RF_TEMP_STS_SPEC;
impl crate::RegisterSpec for RF_TEMP_STS_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [rf_temp_sts::R](R) reader structure"]
impl crate::Readable for RF_TEMP_STS_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets RF_TEMP_STS to value 0x0e"]
impl crate::Resettable for RF_TEMP_STS_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0x0e
    }
}
